export const useActiveStore = defineStore('active', () => {


  let giftsList: any = $ref([])
  const updateGiftsList = (payload) => {
    giftsList = payload
  }

  // 活动时间
  let activeTime: any = $ref('')
  const updateActiveTime = (payload) => {
    activeTime = payload
  }

  // 活动描述
  let activeDec: any = $ref('')
  const updateActiveDec = (payload) => {
    activeDec = payload
  }

  // 活动商品列表
  let activeProductList: any = $ref([])
  const updateActiveProductList = (payload) => {
    activeProductList = payload
  }

  // 买赠选择的赠品
  let currentSelectActive: any = $ref({})
  const updateCurrentSelectActive = (payload) => {
    currentSelectActive = payload
  }

  // 图片列表
  let giftsImgList: any = $ref([])
  const updateGiftsImgList = (payload) => {
    giftsImgList = payload
  }
  return {
    giftsList: $$(giftsList),
    activeTime: $$(activeTime),
    activeDec: $$(activeDec),
    activeProductList: $$(activeProductList),
    currentSelectActive: $$(currentSelectActive),
    giftsImgList: $$(giftsImgList),
    updateGiftsList,
    updateActiveTime,
    updateActiveDec,
    updateActiveProductList,
    updateCurrentSelectActive,
    updateGiftsImgList,
  }
}, { unistorage: { key: 'config-active' } })

if (import.meta.hot)
  import.meta.hot.accept(acceptHMRUpdate(useActiveStore, import.meta.hot))
